doctype html
html
  head
    title 邑大赏金猎人

    // Viewport mobile tag for sensible mobile support
    meta(name="viewport",content="width=device-width, initial-scale=1, maximum-scale=1")

    link(rel="stylesheet", href="/styles/cnode.css")
    link(rel="stylesheet", href="/styles/alertify.core.css")
    link(rel="stylesheet", href="/styles/alertify.default.css")

    block styles

      style.
        .form-actions:before,
        .form-actions:after { display: none !important; }
        #responsive-sidebar-trigger { display: none !important; }
        .nav.pull-right { float: right !important; clear: none !important; }
        input[readonly] { background-color: #f7f7f7; }
        #main { margin-bottom: 40px; }

    script(type="text/javascript", src="/js/jquery.js")
    script(type="text/javascript", src="/js/alertify.min.js")
    script(type="text/javascript", src="/js/jquery.cookie.js")
    script(type="text/javascript", src="/js/moment.min.js")
    script(type="text/javascript", src="/js/moment.js")
    script(type="text/javascript", src="/js/alertmsg.js")

  body

    .navbar
      .navbar-inner
        .container
          ul.nav
            li
              a(href='/') 赏金猎人
          ul.nav.pull-right
            li
              a(href='/') 首页
            if username || admin
              li
                a(href='/logout') 退出
            else
              li
                a(href='/login') 登录
          a#responsive-sidebar-trigger.btn.btn-navbar
            span.icon-bar
            span.icon-bar
            span.icon-bar

    #main
      #sidebar
        if username
          .panel
            .header
              span.col_fade 个人信息
            .inner
              .user_card
                div
                  a.user_avatar(href='/info')
                    img(src=avatar, title='头像')
                  span.user_name
                    a.dark(href='/info') #{username}
                  .board.clearfix
                    .floor
                      a(href='/info')
                        span.big
                        | 我的信息
                    .floor
                      a(href='/tasks/publish')
                        span.big
                        | 我发布的任务
                    .floor
                      a(href='/tasks/accept')
                        span.big
                        | 我接受的任务
                    .floor
                      a(href='/tasks/notcheck')
                        span.big
                        | 未审核任务
            .inner
              a#create_topic_btn(href='/task/create')
                button.btn.btn-success
                  | 发布任务
         if admin
          .panel
            .header
              span.col_fade 个人信息
            .inner
              .user_card
                div
                  span.user_name
                    | #{admin.username}
                  .board.clearfix
                    .floor
                      a(href='/tasks/notcheck')
                        span.big
                        | 未审核任务
                      if admin.isSuper
                        .floor
                          a(href='/admin/add')
                            span.big
                            | 添加管理员
        if !username && !admin
          .panel
            .inner
              p bounty-hunter:邑大赏金猎人
              div
                | 游客请先
                a(href='/login') 登陆
        .panel
          .header
            span.col_fade 赏金猎人 TOP 10
          .inner
            ol
              li
                span.top_score 6375
                span.user_name
                  a(href='/user/jiyinyiyong') 假数据1
              li
                span.top_score 2795
                span.user_name
                  a(href='/user/youxiachai') 假数据2
              li
                span.top_score 2610
                span.user_name
                  a(href='/user/leapon') 假数据3
              li
                span.top_score 2235
                span.user_name
                  a(href='/user/a272121742') 假数据4
              li
                span.top_score 2160
                span.user_name
                  a(href='/user/leizongmin') 假数据5
              li
                span.top_score 2140
                span.user_name
                  a(href='/user/suqian') 假数据6
              li
                span.top_score 1695
                span.user_name
                  a(href='/user/panawang') 假数据7
              li
                span.top_score 1340
                span.user_name
                  a(href='/user/saighost') 假数据8
              li
                span.top_score 1325
                span.user_name
                  a(href='/user/yakczh') 假数据9
              li
                span.top_score 1300
                span.user_name
                  a(href='/user/snoopy') 假数据10

      #content
        block body

    // A few key dependencies, linked in order

    // Bring in the socket.io client
    script(type="text/javascript", src="/js/socket.io.js")

    // then beef it up with some convenience logic for talking to Sails.js'
    script(type="text/javascript", src="/js/sails.io.js")

    // listen on socket.io for incoming messages
    script(type="text/javascript", src="/js/app.js")